import java.util.LinkedList ;
import java.awt.Color ;

public class PointPlot {
	public static final int CIRCLE = 0 ;
	public static final int SQUARE = 1 ;
	public static final int CROSS = 2 ;
	
	public LinkedList<Data> pts = new LinkedList<Data> ( ) ;
	public boolean isVisible = true ;
	private Color c = Color.BLACK ;
	public Object id = null ;
		
	public class Data {
		public OrderedPair pt ;
		public int s ;
		
		public Data ( OrderedPair pt , int s ) {
			this.pt = pt ;
			this.s = s ;
		}
	}
	
	public PointPlot copy ( ) {
		PointPlot result = new PointPlot ( ) ;
		result.pts = new LinkedList<Data> ( pts ) ;
		result.isVisible = isVisible ;
		result.c = c ;
		return result ;
	}
	
	public double getXMin ( ) {
		double result = Double.POSITIVE_INFINITY ;
		
		for ( Data d : pts ) {
			result = Math.min ( result , d.pt.x ) ;
		}
		return result ;
	}

	public double getYMin ( ) {
		double result = Double.POSITIVE_INFINITY ;
		
		for ( Data d : pts ) {
			result = Math.min ( result , d.pt.y ) ;
		}
		return result ;
	}
	
	public double getXMax ( ) {
		double result = Double.NEGATIVE_INFINITY ;
		
		for ( Data d : pts ) {
			result = Math.max ( result , d.pt.x ) ;
		}
		return result ;
	}	

	public double getYMax ( ) {
		double result = Double.NEGATIVE_INFINITY ;
		
		for ( Data d : pts ) {
			result = Math.max ( result , d.pt.y ) ;
		}
		return result ;
	}	
	
	public void add ( OrderedPair pt , int style ) {
		pts.add ( new Data ( pt , style ) ) ;
	}
	
	public Color getColor ( ) {
		return c ;
	}
	
	public void setColor ( Color c ) {
		this.c = c ;
	}
}
